package com.x.scratch.util;

public class Constant {

    public final static String GET = "GET";

    //微信openId
    public final static String WX_APP_ID = "wx6cf6a0d783b83181";

    //微信appSecret
    public final static String WX_APP_SECRET = "e040a0acc879d1f62e5e5d39c57c1de4";

    // 用户同意授权,回调url /wx/pay/notify
    public final static String WX_REDIRECT_URL = "http://www.iwooch.com.cn/controller/wx/token";

    public final static String WX_NOTIFY_URL = "http://www.iwooch.com.cn/controller/wx/pay/notify";

    public final static String WX_OPENID_ = "OPENID_";

    // 用户同意授权,获取code
    public final static String WX_AUTHORIZE_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + WX_APP_ID + "&redirect_uri=" + WX_REDIRECT_URL + "&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";

    // 凭证获取（GET）
    public final static String WX_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + WX_APP_ID + "&secret=" + WX_APP_SECRET + "&code={0}&grant_type=authorization_code";
    public final static String WX_AUTH_URL = "https://api.weixin.qq.com/sns/auth?access_token={0}&openid={1}";//{ "errcode":0,"errmsg":"ok"}
    // 拉去用户信息url
    public final static String WX_USERINFO_URL = "https://api.weixin.qq.com/sns/userinfo?access_token={0}&openid={1}&lang=zh_CN";

    public final static String WX_KEY = "oDqSkIvD6WFCDIRockZk8IJ0Q2ccFZLR";
    public final static String WX_MCHID = "1359090902";
    public final static String WX_PAY_CERT_PATH = "/opt/apache-tomcat-8.5.15/conf/scratch-wx-api-cert.p12";

    public final static String OPENID = "openid";
    public final static String ACCESS_TOKEN = "access_token";
}
